<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                template="layout.xhtml">

   <ui:define name="body">
      <h:form id="register">
         <h:messages/>
         <s:validateAll>
            <rich:panel>
               <f:facet name="header">Registracija</f:facet>
               <p>Vpišite želeno uporabniško ime in geslo ter prepišite znake.</p>
               <h:panelGrid columns="3" rowClasses="prop" columnClasses="name,value,msg" styleClass="dialog">
                  <h:outputLabel for="username">Uporabniško ime</h:outputLabel>
                  <h:inputText id="username" value="#{register.user.username}" />
                  <h:message for="username"/>

                  <h:outputLabel for="password">Geslo</h:outputLabel>
                  <h:inputSecret id="password" value="#{register.user.password}" />
                  <h:message for="password"/>

                  <h:outputLabel for="name">Ime</h:outputLabel>
                  <h:inputText id="name" value="#{register.user.name}" />
                  <h:message for="name"/>

                  <h:panelGroup>
                     <h:graphicImage value="/seam/resource/captcha?#{captcha.id}" />
                     <h:outputLabel for="verifyCaptcha">Prepišite črke</h:outputLabel>
                  </h:panelGroup>
                  <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"/>
                  <h:message for="verifyCaptcha"/>
               </h:panelGrid>
            </rich:panel>

            <h:commandButton action="#{register.next}" value="Register" />
         </s:validateAll>
      </h:form>
   </ui:define>

   <ui:define name="foot">
      <s:link view="/home.xhtml" value="Home" propagation="end" />
   </ui:define>

</ui:composition>